import pymysql

if __name__ == '__main__':

    conn=pymysql.connect(user='pantest',
                    password='pantest_2021',
                    host='192.168.0.137',
                    database='test',
                    port=3306,
                    charset='utf8')
    cursor=conn.cursor()
    sql="select * from formjs where pepnum=%s"
    cursor.execute(sql,(2,))
    data=cursor.fetchall()
    for i in data:
        print(i)
    cursor.close()
    conn.close()

